<template>
  <div style="padding:20px">
    <el-skeleton v-if="loading" :rows="15" animated />
    <el-table
      v-if="!loading"
      :data="tableData"
      border
    >
      <el-table-column prop="date" label="时间" width="180" />
      <el-table-column prop="name" label="名字" width="180" />
      <el-table-column prop="address" label="内容" />
    </el-table>
  </div>
</template>

<script lang="ts">
import {getTableData} from "@/api/table"
import {defineComponent,reactive , toRefs , ref } from "vue";
export default defineComponent({
  setup(){
    let tableData= ref<Array<any>>([])
    let loading = ref<Boolean>(true)
    getTableData().then(res=>{
      tableData.value = res.data
      loading.value = false
    })
    return {
      tableData,
      loading
    }
  }
})
</script>

<style lang="sass">

</style>